package awk.designModel.strate;

public class Context {

	public static void main(String[] args) throws Exception {
		Context context = new Context();
		context.setStrategy(new ConcreteStrategyA());
		context.method();

		context.setStrategy(new ConcreteStrategyB());
		context.method();

		context.setStrategy(new ConcreteStrategyC());
		context.method();
	}

	Strategy strategy;
	public void setStrategy(Strategy strategy) {
		this.strategy = strategy;
	}
	public void method() {
		strategy.algorithm();
	}

}
